package com.snailvr.tv.ui.data;

import com.snail.readyvr.R;

import java.util.HashMap;
import java.util.Iterator;

/**
 * Created by sj on 16/3/16.
 */
public class DefEmoticons {
    public static final HashMap<String, Integer> emoticonHashMap = new HashMap<>();
    static {
        emoticonHashMap.put("[微笑]", R.drawable.expression_1);
        emoticonHashMap.put("[憋嘴]", R.drawable.expression_2);
        emoticonHashMap.put("[色]", R.drawable.expression_3);
        emoticonHashMap.put("[发呆]", R.drawable.expression_4);
        emoticonHashMap.put("[得意]", R.drawable.expression_5);
        emoticonHashMap.put("[流泪]", R.drawable.expression_6);
        emoticonHashMap.put("[害羞]", R.drawable.expression_7);
        emoticonHashMap.put("[闭嘴]", R.drawable.expression_8);
        emoticonHashMap.put("[睡]", R.drawable.expression_9);
        emoticonHashMap.put("[大哭]", R.drawable.expression_10);
        emoticonHashMap.put("[尴尬]", R.drawable.expression_11);
        emoticonHashMap.put("[发怒]", R.drawable.expression_12);
        emoticonHashMap.put("[调皮]", R.drawable.expression_13);
        emoticonHashMap.put("[大笑]", R.drawable.expression_14);
        emoticonHashMap.put("[惊讶]", R.drawable.expression_15);
        emoticonHashMap.put("[难过]", R.drawable.expression_16);
        emoticonHashMap.put("[囧]", R.drawable.expression_17);
        emoticonHashMap.put("[抓狂]", R.drawable.expression_18);
        emoticonHashMap.put("[吐]", R.drawable.expression_19);
        emoticonHashMap.put("[偷笑]", R.drawable.expression_20);
        emoticonHashMap.put("[愉快]", R.drawable.expression_21);
        emoticonHashMap.put("[吐舌]", R.drawable.expression_22);
        emoticonHashMap.put("[傲慢]", R.drawable.expression_23);
        emoticonHashMap.put("[困]", R.drawable.expression_24);
        emoticonHashMap.put("[惊恐]", R.drawable.expression_25);
        emoticonHashMap.put("[流汗]", R.drawable.expression_26);
        emoticonHashMap.put("[悠闲]", R.drawable.expression_27);
        emoticonHashMap.put("[奋斗]", R.drawable.expression_28);
        emoticonHashMap.put("[咒骂]", R.drawable.expression_29);
        emoticonHashMap.put("[恶魔]", R.drawable.expression_30);
        emoticonHashMap.put("[邪恶]", R.drawable.expression_31);
        emoticonHashMap.put("[外星人]", R.drawable.expression_32);
        emoticonHashMap.put("[僵尸]", R.drawable.expression_33);
        emoticonHashMap.put("[机器人]", R.drawable.expression_34);
        emoticonHashMap.put("[大便]", R.drawable.expression_35);
        emoticonHashMap.put("[疑问]", R.drawable.expression_36);
        emoticonHashMap.put("[嘘]", R.drawable.expression_37);
        emoticonHashMap.put("[晕]", R.drawable.expression_38);
        emoticonHashMap.put("[衰]", R.drawable.expression_39);
        emoticonHashMap.put("[骷髅]", R.drawable.expression_40);
        emoticonHashMap.put("[打击]", R.drawable.expression_41);
        emoticonHashMap.put("[再见]", R.drawable.expression_42);
        emoticonHashMap.put("[抠鼻]", R.drawable.expression_43);
        emoticonHashMap.put("[鼓掌]", R.drawable.expression_44);
        emoticonHashMap.put("[坏笑]", R.drawable.expression_45);
        emoticonHashMap.put("[哼]", R.drawable.expression_46);
        emoticonHashMap.put("[哈欠]", R.drawable.expression_47);
        emoticonHashMap.put("[鄙视]", R.drawable.expression_48);
        emoticonHashMap.put("[委屈]", R.drawable.expression_49);
        emoticonHashMap.put("[快哭了]", R.drawable.expression_50);
        emoticonHashMap.put("[阴险]", R.drawable.expression_51);
        emoticonHashMap.put("[亲亲]", R.drawable.expression_52);
        emoticonHashMap.put("[怪物]", R.drawable.expression_53);
        emoticonHashMap.put("[幽灵]", R.drawable.expression_54);
        emoticonHashMap.put("[感冒]", R.drawable.expression_55);
        emoticonHashMap.put("[苦笑]", R.drawable.expression_56);
        emoticonHashMap.put("[瞪眼]", R.drawable.expression_57);
        emoticonHashMap.put("[尖叫]", R.drawable.expression_58);
        emoticonHashMap.put("[遗憾]", R.drawable.expression_59);
        emoticonHashMap.put("[斜眼]", R.drawable.expression_60);
        emoticonHashMap.put("[嘿哈]", R.drawable.expression_61);
        emoticonHashMap.put("[捂脸]", R.drawable.expression_62);
        emoticonHashMap.put("[奸笑]", R.drawable.expression_63);
        emoticonHashMap.put("[眨眼]", R.drawable.expression_64);
        emoticonHashMap.put("[机智]", R.drawable.expression_65);
        emoticonHashMap.put("[皱眉]", R.drawable.expression_66);
        emoticonHashMap.put("[耶]", R.drawable.expression_67);
        emoticonHashMap.put("[菜刀]", R.drawable.expression_68);
        emoticonHashMap.put("[西瓜]", R.drawable.expression_69);
        emoticonHashMap.put("[啤酒]", R.drawable.expression_70);
        emoticonHashMap.put("[咖啡]", R.drawable.expression_71);
        emoticonHashMap.put("[猪头]", R.drawable.expression_72);
        emoticonHashMap.put("[玫瑰]", R.drawable.expression_73);
        emoticonHashMap.put("[凋谢]", R.drawable.expression_74);
        emoticonHashMap.put("[嘴唇]", R.drawable.expression_75);
        emoticonHashMap.put("[爱心]", R.drawable.expression_76);
        emoticonHashMap.put("[心碎]", R.drawable.expression_77);
        emoticonHashMap.put("[蛋糕]", R.drawable.expression_78);
        emoticonHashMap.put("[炸弹]", R.drawable.expression_79);
        emoticonHashMap.put("[晚安]", R.drawable.expression_80);
        emoticonHashMap.put("[太阳]", R.drawable.expression_81);
        emoticonHashMap.put("[抱抱]", R.drawable.expression_82);
        emoticonHashMap.put("[强]", R.drawable.expression_83);
        emoticonHashMap.put("[弱]", R.drawable.expression_84);
        emoticonHashMap.put("[握手]", R.drawable.expression_85);
        emoticonHashMap.put("[胜利]", R.drawable.expression_86);
        emoticonHashMap.put("[抱拳]", R.drawable.expression_87);
        emoticonHashMap.put("[勾引]", R.drawable.expression_88);
        emoticonHashMap.put("[拳头]", R.drawable.expression_89);
        emoticonHashMap.put("[OK]", R.drawable.expression_90);
        emoticonHashMap.put("[不对]", R.drawable.expression_91);
        emoticonHashMap.put("[双手合十]", R.drawable.expression_92);
        emoticonHashMap.put("[加油]", R.drawable.expression_93);
        emoticonHashMap.put("[庆祝]", R.drawable.expression_94);
        emoticonHashMap.put("[礼物]", R.drawable.expression_95);
        emoticonHashMap.put("[茶]", R.drawable.expression_96);
        emoticonHashMap.put("[红包]", R.drawable.expression_97);
        emoticonHashMap.put("[蜡烛]", R.drawable.expression_98);
    }

    public static String StringToEmoji(String string) {
        String result  = string;
        Iterator<String> iterator =  emoticonHashMap.keySet().iterator();
        while (iterator.hasNext()) {
            String target = iterator.next();
            if (result.contains(target)) {
                result = result.replace(target,"<img src='" + emoticonHashMap.get(target) + "'/>");
            }
        }

        return result;
    }
}














